#pragma once

#include "motion_generators/movement_generator.h"

namespace battle::motion
{

    template < class T >
    class HomeMovementGenerator;

    template <>
    class HomeMovementGenerator<battle::object::Creature>
        : public MovementGeneratorMedium< battle::object::Creature, HomeMovementGenerator<battle::object::Creature> >
    {
    public:

        HomeMovementGenerator() : arrived(false) {}
        ~HomeMovementGenerator() {}

        void Initialize(battle::object::Creature&);
        void Finalize(battle::object::Creature&);
        void Interrupt(battle::object::Creature&) {}
        void Reset(battle::object::Creature&);
        bool Update(battle::object::Creature&, const unsigned int&);
        MovementGeneratorType GetMovementGeneratorType() const override { return HOME_MOTION_TYPE; }

    private:
        void _setTargetLocation(battle::object::Creature&);
        bool arrived;
    };

}